﻿@model IPageable<XPressify.Models.ListEventModel>
@using XPressify.Controllers
@using Omu.Awesome.Core;
@using Omu.Awesome.Mvc.Helpers;


@{
    ViewBag.Title = "Events";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2 style="color:#222;">Events</h2>
<p>
    @(Html.MakePopupForm<EventController>(o => o.EventCreate(), "Create event",692, null , true, "Create", null, null,null,null, false, null,false))
    @(Html.PopupFormActionLink<EventController>(o => o.EventCreate(), "Create event"))
</p>

<table>

@foreach (var item in Model.Page)
{
    <tr>
        <td style="text-align:center;word-break:break-all">
            <div style="font-weight:bolder;font-size:14px">@Html.ActionLink(item.EventModel.Name, "EventDetails", "Event", new { id = item.EventModel.Id }, new { @class = "nobtn" })</div>
            @item.EventModel.StartDate.ToString("dddd, dd MMMM, yyyy a't' HH:mm") - @item.EventModel.EndDate.ToString("dd MMMM, yyyy a't' HH:mm")
            <br />
            @item.EventModel.Location
        </td>
        <td width="600px">
        </td>
    </tr>
}
</table>
@Html.Pagination()
